<%@ page language="java" pageEncoding="utf-8"%>
<!DOCTYPE HTML>
<html>
	<head>
		<meta http-equiv="Content-type" content="text/html; charset=UTF-8" />
		<link rel="stylesheet" href="/css/login.css"/>
		<title>欢迎您登陆</title>
		<script>
			//在页面加载完成后, 获取用户名(url编码后的用户名), 通过js进行url解码
			window.onload = function(){
				var oUsername = document.getElementsByName("username")[0];
				var username = decodeURI(oUsername.value);
				oUsername.value = username;
			}
		</script>
	</head>
	<body>
		<h1>欢迎登录</h1>
		<form action="loginSave.action" method="POST">
			<table>
				<tr>
					<td class="tdx" colspan="2" style="color:red; font-size: 14px;text-align: center;">${errorInfo}</td>
				</tr>
				<tr>
					<td class="tdx">用户名:</td>
					<td><input type="text" name="username" value="${ cookie.remname.value }"/></td>
				</tr>
				<tr>
					<td class="tdx">密码:</td>
					<td><input type="password" name="password"/></td>
				</tr>
				<tr>
					<td colspan="2">
						<input type="checkbox" name="remname" value="true" 
							${ cookie.remname != null ? "checked='checked'" : "" }
							/>记住用户名
						<input type="checkbox" name="autologin" value="true"/>30天内自动登陆
					</td>
				</tr>
				<tr>
					<td colspan="2" style="text-align: center;">
						<input type="submit" value="登陆"/>
					</td>
				</tr>
			</table>
		</form>		
	</body>
</html>
